<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>删除元素</title>
</head>
<body>
	<script type="text/javascript">
		function deletes( arr ){
			for( var i = 0; i < arr.length; i++ ){
				for( var k = i+1; k < arr.length; k++ ){
					if( arr[i] == arr[k]  ){
					
						arr.splice(k,1);
						k--;
					}
				}
			}
			return arr;
		}
		var strArr = ['a','b','c','d','d','d','d','d','d','d','d','d','d','d','d'];
		 alert(deletes( strArr ));
	</script>
</body>
</html>